#include<cstdio>
#include<cstring>
const int maxn=32201;
const int maxm=15011;
int ans[maxm];
int c[maxn];
int low(int x)
{
	return x&(x^(x-1));
}
int sum(int x)
{
	int ans=0;
	while(x>0)
	{
		ans+=c[x];
		x-=low(x);
	}
	return ans;
}
void add(int i,int x)
{
	while(i<maxn)
	{
		c[i]+=x;
		i+=low(i);
	}
}
int main()
{
	freopen("test.in","r",stdin);
	int n;
	scanf("%d",&n);
	memset(c,0,sizeof(c));
	int x,y;
	for(int i=1;i<=n;i++)
	{
		scanf("%d%d",&x,&y);
		x++;
		int level=sum(x);
		ans[level]++;
		add(x,1);
	}

	for(int i=0;i<=n-1;i++)
		printf("%d\n",ans[i]);
	return 0;
}



